import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home";
import  Movie from "../views/Movie"
import  Theater from "../views/Theater"
import  myCenter from "../views/myCenter"
import Hot from "../views/Hot"
import ComingSoon from "../views/ComingSoon"


Vue.use(VueRouter);

const routes = [
  {
    path:"/",
    redirect: "/home"
  },
  {
    path: "/home",
    name:"home",
    redirect:"/home/movie",
    component: Home,
    children:[
      {path:'movie',
        component:Movie,
        redirect:'/home/movie/hot',
        children: [
          {path:'hot',component:Hot},
          {path:'comingSoon',component:ComingSoon}
        ]
      },
      {path:'Theater',component:Theater},
      {path:'myCenter',component:myCenter}
    ]
  }
];

const router = new VueRouter({
  routes
});

export default router;
